]> dgit.raspbian.org Git - gnome-shell.git/commit
a11y: Change HC icon theme first
authorFlorian Müllner <fmuellner@gnome.org>
Sat, 14 Dec 2019 18:15:53 +0000 (19:15 +0100)
committerFlorian Müllner <fmuellner@gnome.org>
Tue, 17 Mar 2020 11:45:25 +0000 (12:45 +0100)
commit36b8dcbe076a02d5687238bb5ac999dd43277a65
tree787535a0173f1c13d0952d6a8edc995a4ee6548f
parent07fa5ef849fcb67bacff67aa0166035e45bd4d34
a11y: Change HC icon theme first

There are two ways for applications to provide a high contrast icon:

 1. install an icon into the HighContrast theme
 2. install a symbolic icon into the default hicolor theme

The latter is preferred nowadays, and implemented in the high-contrast
CSS variant by enforcing the symbolic icon style.

However together with the way we currently enable/disable high-contrast,
this can lead to the following race:
 1. the GTK theme is changed from HighContrast
 2. we reload the default stylesheet
 3. the icon style changes to "regular", so we request a
    new icon from the HighContrast icon theme
 4. the icon theme is changed from HighContrast
 5. we evict existing icons from the cache
 6. we reload icons for the new icon theme; however as we
    find a pending request (from 3), we re-use it
 7. the request from 3 finishes, and we end up with a
    wrong icon in the cache

The simplest fix is to change the icon theme before the GTK theme: Unlike the
theme name, the icon style is encoded in the cache key, so we won't re-use
an old (and incorrect) request in that case.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/2414
js/ui/status/accessibility.js